<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
<div>aaa</div>
<div class="header">bbb</div>
<div id="ab">ccc</div>

<script>
(function (global) {

	function jQuery(selector) {
	    return new jQuery.prototype.init(selector)
	}

	jQuery.prototype = {
		constructor: jQuery,
	    init:function(selector) {
			    const elements = document.querySelectorAll(selector);

			    for(let i=0;i<elements.length;i++){
				    this[i] =  elements[i];
			    }
			    this.length = elements.length;

		    },
	    css(name, val) {
		    for(let i=0;i<this.length;i++){
			    let element = this[i]
			    element.style[name] = val;
		    }
        }
	}

	jQuery.prototype.init.prototype = jQuery.prototype

	global.$ = global.jQuery = jQuery;

})(window)
$(".header").css('color','red')
</script>
</body>
</html>